body {
  background: black;
  font-family: 'Varela', sans-serif;
}

.glitch {
  color: white;
  font-size: 100px;
  position: relative;
  width: 400px;
  margin: 0 auto;
}

@keyframes noise-anim {
  0% {
    clip: rect(2px, 9999px, 1px, 0);
  }
  5% {
    clip: rect(34px, 9999px, 76px, 0);
  }
  10% {
    clip: rect(87px, 9999px, 27px, 0);
  }
  15% {
    clip: rect(71px, 9999px, 7px, 0);
  }
  20% {
    clip: rect(42px, 9999px, 98px, 0);
  }
  25% {
    clip: rect(50px, 9999px, 53px, 0);
  }
  30% {
    clip: rect(96px, 9999px, 11px, 0);
  }
  35% {
    clip: rect(68px, 9999px, 38px, 0);
  }
  40% {
    clip: rect(52px, 9999px, 8px, 0);
  }
  45% {
    clip: rect(37px, 9999px, 36px, 0);
  }
  50% {
    clip: rect(43px, 9999px, 37px, 0);
  }
  55% {
    clip: rect(37px, 9999px, 46px, 0);
  }
  60% {
    clip: rect(63px, 9999px, 41px, 0);
  }
  65% {
    clip: rect(43px, 9999px, 62px, 0);
  }
  70% {
    clip: rect(84px, 9999px, 29px, 0);
  }
  75% {
    clip: rect(20px, 9999px, 83px, 0);
  }
  80% {
    clip: rect(98px, 9999px, 81px, 0);
  }
  85% {
    clip: rect(58px, 9999px, 20px, 0);
  }
  90% {
    clip: rect(52px, 9999px, 33px, 0);
  }
  95% {
    clip: rect(56px, 9999px, 14px, 0);
  }
  100% {
    clip: rect(44px, 9999px, 52px, 0);
  }
}

.glitch:after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  text-shadow: -1px 0 red;
  top: 0;
  color: white;
  background: black;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-anim 2s infinite linear alternate-reverse;
}

@keyframes noise-anim-2 {
  0% {
    clip: rect(17px, 9999px, 72px, 0);
  }
  5% {
    clip: rect(97px, 9999px, 14px, 0);
  }
  10% {
    clip: rect(91px, 9999px, 52px, 0);
  }
  15% {
    clip: rect(10px, 9999px, 42px, 0);
  }
  20% {
    clip: rect(42px, 9999px, 7px, 0);
  }
  25% {
    clip: rect(21px, 9999px, 90px, 0);
  }
  30% {
    clip: rect(74px, 9999px, 4px, 0);
  }
  35% {
    clip: rect(53px, 9999px, 70px, 0);
  }
  40% {
    clip: rect(7px, 9999px, 14px, 0);
  }
  45% {
    clip: rect(79px, 9999px, 94px, 0);
  }
  50% {
    clip: rect(82px, 9999px, 100px, 0);
  }
  55% {
    clip: rect(10px, 9999px, 64px, 0);
  }
  60% {
    clip: rect(37px, 9999px, 54px, 0);
  }
  65% {
    clip: rect(99px, 9999px, 71px, 0);
  }
  70% {
    clip: rect(58px, 9999px, 90px, 0);
  }
  75% {
    clip: rect(72px, 9999px, 54px, 0);
  }
  80% {
    clip: rect(81px, 9999px, 61px, 0);
  }
  85% {
    clip: rect(59px, 9999px, 49px, 0);
  }
  90% {
    clip: rect(45px, 9999px, 93px, 0);
  }
  95% {
    clip: rect(46px, 9999px, 55px, 0);
  }
  100% {
    clip: rect(77px, 9999px, 68px, 0);
  }
}

.glitch:before {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  text-shadow: 1px 0 blue;
  top: 0;
  color: white;
  background: black;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-anim-2 3s infinite linear alternate-reverse;
}
